Bug 557316 – GtkLinkButton should consider user-defined tooltip
authorChristian Dywan <cdywan@src.gnome.org>
Thu, 30 Oct 2008 08:49:18 +0000 (08:49 +0000)
committerChristian Dywan <cdywan@src.gnome.org>
Thu, 30 Oct 2008 08:49:18 +0000 (08:49 +0000)
* gtk/gtklinkbutton.c (gtk_link_button_query_tooltip_cb):
Only override the tooltip if not previously set

svn path=/trunk/; revision=21728

ChangeLog
gtk/gtklinkbutton.c

index 07e78e77f539204457251181f5d984c34f0b7060..e70b4427eba38eda1a699377967c58c6c79dce65 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-30  Christian Dywan  <christian@imendio.com>
+
+       Bug 557316 – GtkLinkButton should consider user-defined tooltip
+
+       * gtk/gtklinkbutton.c (gtk_link_button_query_tooltip_cb):
+       Only override the tooltip if not previously set
+
 2008-10-29  Christian Dywan  <christian@imendio.com>
 
        Bug 557762 – Misleading error message in GDK DirectFB
index 9a6d134e996d61331092a90601f9a747d230c1fe..6db17a933b1fd1a5d3956e5d9310a92cb7625d58 100644 (file)
@@ -620,7 +620,9 @@ gtk_link_button_query_tooltip_cb (GtkWidget    *widget,
   label = gtk_button_get_label (GTK_BUTTON (link_button));
   uri = link_button->priv->uri;
 
-  if (label && *label != '\0' && uri && strcmp (label, uri) != 0)
+  if (!gtk_widget_get_tooltip_text (widget)
+    && !gtk_widget_get_tooltip_markup (widget)
+    && label && *label != '\0' && uri && strcmp (label, uri) != 0)
     {
       gtk_tooltip_set_text (tooltip, uri);
       return TRUE;